const input1 = document.getElementById('input1')
let timer = null
input1.addEventListener('keyup', function(){
  if (timer) {
    clearTimeout(timer)
  }
  timer = setTimeout(()=>{
    console.log(input1.value)
    timer = null
  }, 500)
})
